package Stack;

public class Text {
    public static void main(String[] args) {
        ArrayStack<Integer> arrayStack = new ArrayStack<>(10);
        arrayStack.push(1);
        arrayStack.push(2);
        arrayStack.push(3);
        arrayStack.push(4);
        arrayStack.push(5);
        for (Integer integer : arrayStack) {
            System.out.println(integer);
        }

        System.out.println(arrayStack.isEmpty());
        System.out.println(arrayStack.isFull());
        System.out.println(arrayStack.peek());
        System.out.println(arrayStack.pop());
        for (Integer integer : arrayStack) {
            System.out.print(integer + " ");
        }
    }
    public static void main1(String[] args) {
        LinkedListStack<Integer> linkedListStack = new LinkedListStack<>(3);
        linkedListStack.push(1);
        linkedListStack.push(2);
        linkedListStack.push(3);
        for (Integer integer : linkedListStack) {
            System.out.println(integer);
        }
        System.out.println(linkedListStack.pop());
        System.out.println(linkedListStack.pop());
        System.out.println(linkedListStack.pop());
        System.out.println("================");
        for (Integer integer : linkedListStack) {
            System.out.println(integer);
        }
    }
}
